<script>
export default {
  name: "ArticleCase",
  data() {
    return {
      isEdit: false,
      defaultObj: {
        title: "如何成为一名LOL资深玩家",
        subject: "前端",
      },
      form: {
        title: "",
        subject: "",
      },
    };
  },
  methods: {
    edit() {
      this.isEdit = true;
      this.form = { ...this.defaultObj };
    },
    confirm() {
      this.isEdit = false;
      this.defaultObj = { ...this.form };
    },
  },
};
</script>



